x86/asm: Remove opencoded uses of altinstruction_entry
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 9 Feb 2018 15:58:39 +0000 (15:58 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 9 Mar 2018 14:44:16 +0000 (14:44 +0000)
commitf54999f6147c9cde143cc50483f0187f75de188a
tree1a9dcab2b6643b0b11fe81f986520eafa310e532
parente95125108e8b1073e36759cc201a7778f1506f53
x86/asm: Remove opencoded uses of altinstruction_entry

With future changes, altinstruction_entry is going to become more complicated
to use.  Furthermore, there are already ALTERNATIVE* macros which can be used
to avoid opencoding the creation of replacement information.

For ASM_STAC, ASM_CLAC and CR4_PV32_RESTORE, this means the removal of all
hardocded label numbers.  For the cr4_pv32 alternatives, this means hardcoding
the extra space required in the original patch site, but the hardcoding will
be removed by a later patch.

No change to any functionality, but the handling of nops inside the original
patch sites are a bit different.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/x86_64/compat/entry.S
xen/arch/x86/x86_64/entry.S
xen/include/asm-x86/asm_defns.h